{extend name="public:base" /}
{block name="content"}
<div class="page-header">
	<h1>
		{$breadcrumb1}
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$breadcrumb2}
		</small>
	</h1>
</div>
<div class="row">
	<div class="col-xs-12">	
		<div class="form-horizontal">	
			<legend>系统参数 </legend>
			
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">默认运费模板 </label>
			<div class="col-sm-10">
				<div class="clearfix">					
						<select class="form-control" name="default_transport_id">							
						{volist name="transport" id="t" }
							<option {if condition="$t['id'] eq config('default_transport_id') "} selected="selected"{/if} value="{$t.id}">{$t.title}</option>
						{/volist}				
						</select>		
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">商品免运费额度 (元)</label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input class="col-xs-10 col-sm-10 form-control" name="free_shipping" type="text" value="{$Think.config.free_shipping}" >
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">充值最小额度 (元)</label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input class="col-xs-10 col-sm-10 form-control" name="predeposit_num" type="text" value="{$Think.config.predeposit_num}" >
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">page_num </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input class="col-xs-10 col-sm-10 form-control" name="page_num" type="text" value="{$Think.config.page_num}" >
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">售后有效期 (天)</label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input class="col-xs-10 col-sm-10 form-control" name="aftersales_time" type="text" value="{$Think.config.aftersales_time}" >
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">开启验证码 </label>
			<div class="col-sm-10">
				<div class="clearfix">					
						<label class="radio-inline"><input type="radio" value="1" checked="checked" name="use_captcha">是</label>	
						<label class="radio-inline"><input type="radio" value="0" name="use_captcha">否</label>				
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">是否保存用户行为 </label>
			<div class="col-sm-10">
				<div class="clearfix">					
						<label class="radio-inline"><input type="radio" checked="checked" value="true" name="storage_user_action">是</label>	
						<label class="radio-inline"><input type="radio" value="false" name="storage_user_action">否</label>				
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">评论需要审核 </label>
			<div class="col-sm-10">
				<div class="clearfix">					
						<label class="radio-inline"><input type="radio" checked="checked" value="1" name="check_comment">是</label>	
						<label class="radio-inline"><input type="radio" value="0" name="check_comment">否</label>				
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">注册需要审核 </label>
			<div class="col-sm-10">
				<div class="clearfix">					
						<label class="radio-inline"><input type="radio" checked="checked" value="1" name="reg_check">是</label>	
						<label class="radio-inline"><input type="radio" value="0" name="reg_check">否</label>				
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">默认会员组 </label>
			<div class="col-sm-10">
				<div class="clearfix">					
						<select class="form-control" name="default_group_id">							
						{volist name="member_auth_group" id="group" }
							<option {if condition="$group['id'] eq config('default_group_id') "} selected="selected"{/if} value="{$group.id}">{$group.title}</option>
						{/volist}				
						</select>		
				</div>
			</div>
			</div>
			
		
			<legend>单位参数 </legend>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">  长度单位 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<select class="form-control" name="length_id">							
						{volist name="length" id="length" }
							<option {if condition="$length['length_class_id'] eq config('length_id') "} selected="selected"{/if} value="{$length.length_class_id}">{$length.title}</option>
						{/volist}				
					</select>
				</div>
			</div>
			</div>
			
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">  重量单位 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<select class="form-control" name="weight_id">							
						{volist name="weight" id="weight" }
							<option {if condition="$weight['weight_class_id'] eq config('weight_id') "} selected="selected"{/if} value="{$weight.weight_class_id}">{$weight.title}</option>
						{/volist}				
					</select>
				</div>
			</div>
			</div>
			<legend>订单状态 </legend>
			<div class="form-group">			
				<label class="col-sm-2 control-label no-padding-left"> 默认订单状态 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<select class="form-control" name="default_order_status_id">						
						{volist name="order_status" id="status" }
							<option {if condition="$status['order_status_id'] eq config('default_order_status_id') "} selected="selected"{/if} value="{$status.order_status_id}">{$status.name}</option>
						{/volist}					
					</select>
				</div>
			</div>
			</div>
			
			<div class="form-group">			
				<label class="col-sm-2 control-label no-padding-left"> 订单付款状态 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<select class="form-control" name="paid_order_status_id">						
						{volist name="order_status" id="status" }
							<option {if condition="$status['order_status_id'] eq config('paid_order_status_id') "} selected="selected"{/if} value="{$status.order_status_id}">{$status.name}</option>
						{/volist}					
					</select>
				</div>
			</div>
			</div>
			
			<div class="form-group">			
				<label class="col-sm-2 control-label no-padding-left"> 已发货状态 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<select class="form-control" name="shipping_order_status_id">						
						{volist name="order_status" id="status" }
							<option {if condition="$status['order_status_id'] eq config('shipping_order_status_id') "} selected="selected"{/if} value="{$status.order_status_id}">{$status.name}</option>
						{/volist}					
					</select>
				</div>
			</div>
			</div>			
			
			<div class="form-group">			
				<label class="col-sm-2 control-label no-padding-left"> 已收货状态 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<select class="form-control" name="get_order_status_id">						
						{volist name="order_status" id="status" }
							<option {if condition="$status['order_status_id'] eq config('get_order_status_id') "} selected="selected"{/if} value="{$status.order_status_id}">{$status.name}</option>
						{/volist}					
					</select>
				</div>
			</div>
			</div>
			
			<div class="form-group">			
				<label class="col-sm-2 control-label no-padding-left"> 订单完成状态 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<select class="form-control" name="complete_order_status_id">						
						{volist name="order_status" id="status" }
							<option {if condition="$status['order_status_id'] eq config('complete_order_status_id') "} selected="selected"{/if} value="{$status.order_status_id}">{$status.name}</option>
						{/volist}					
					</select>
				</div>
			</div>
			</div>
			
			<div class="form-group">			
				<label class="col-sm-2 control-label no-padding-left"> 订单取消状态 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<select class="form-control" name="cancel_order_status_id">						
						{volist name="order_status" id="status" }
							<option {if condition="$status['order_status_id'] eq config('cancel_order_status_id') "} selected="selected"{/if} value="{$status.order_status_id}">{$status.name}</option>
						{/volist}					
					</select>
				</div>
			</div>
			</div>
			
			<div class="form-group">			
				<label class="col-sm-2 control-label no-padding-left"> 退款状态 </label>
				<div class="col-sm-10">
					<div class="clearfix">
						<select class="form-control" name="refund_order_status_id">						
							{volist name="order_status" id="status" }
								<option {if condition="$status['order_status_id'] eq config('refund_order_status_id') "} selected="selected"{/if} value="{$status.order_status_id}">{$status.name}</option>
							{/volist}					
						</select>
					</div>
				</div>
			</div>
			
			<div class="form-group">			
				<label class="col-sm-2 control-label no-padding-left"> 交易关闭状态 </label>
				<div class="col-sm-10">
					<div class="clearfix">
						<select class="form-control" name="close_order_status_id">						
							{volist name="order_status" id="status" }
								<option {if condition="$status['order_status_id'] eq config('close_order_status_id') "} selected="selected"{/if} value="{$status.order_status_id}">{$status.name}</option>
							{/volist}					
						</select>
					</div>
				</div>
			</div>
			
			<legend>快递100物流查询 </legend>
			<div class="form-group">
				<label class="col-sm-2 control-label no-padding-left">授权密匙 </label>
			<div class="col-sm-10">
				<div class="clearfix">
					<input class="col-xs-10 col-sm-10 form-control" name="kuaidi100_key" type="text" value="{$Think.config.kuaidi100_key}" >
				</div>
			</div>
			</div>
			
		</div>
		<div class="form-group">
			<label class="col-sm-1 control-label no-padding-left"> </label>	
			<div class="col-sm-11">
				<button form="form" type="submit" id="send"  class="btn btn-sm btn-primary">提交</button>		
			</div>
		</div>
	</div>
</div>
{/block}
{block name="javascript"}
<script>
$(function(){
	Oscshop.setValue("storage_user_action", '{$Think.config.storage_user_action}');		
	Oscshop.setValue("check_comment",'{$Think.config.check_comment}');		
	Oscshop.setValue("reg_check",'{$Think.config.reg_check}');
	Oscshop.setValue("use_captcha", '{$Think.config.use_captcha}');	
});	
$('#send').click(function(){
	$.post(
		"{:url('Settings/save')}",
		$('input[type=\'text\'],input[type=\'hidden\'],input[type=\'radio\']:checked,textarea,select'),
		function(d){
			art.dialog({
					content:d.success,
					lock: true,
					ok: function () {	 		
				 	  reloadPage(window);    	
				      return false;
				    }
				});	
		}
	);
});
</script>	
{/block}